#ifndef FND_RESOURCE_MANAGER_HPP
#define FND_RESOURCE_MANAGER_HPP
#include <string>
#include <map>
namespace Utility {
    
    template<typename T, typename Key = std::string>
    class resource_manager {
    public:
        typedef Key key_type ;
        typedef T* value_type ;
        typedef std::map<key_type, value_type> resource_manager_map ;
        const value_type get(const key_type& key) const {
            if(resource_map.count(key)) {
                return (*resource_map.find(key)).second ;
            }
            return 0 ;
        }
        value_type get(const key_type& key) {
            if(resource_map.count(key)) return resource_map[key] ;
            return 0 ;
        }
    private:
        resource_manager_map resource_map ;
    } ;
}

#endif
